<!-- saved from url=(0022)http://internet.e-mail -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<tpl> $NCharset </tpl>" />
<link href="<tpl> $template_dir </tpl>/member/css/layout.css" rel="stylesheet" type="text/css" />
<link href="<tpl> $template_dir </tpl>/member/css/shop.manage.css" rel="stylesheet" type="text/css" />
<tpl>include file ='../head.config.html'</tpl>
<tpl>include file ='../../../js/validate/member_product.add.html'</tpl>
</head>
<body><tpl>include file ='../header.html'</tpl>
<div id="container_productadd">
<!--<div class="biaoti" style=" height:30px;text-align:left"><img src="<tpl> $template_dir </tpl>/home/images/ico.gif" /> <a href="<tpl> $site_url </tpl>/member/own_product.php?action=sell"style=" font-weight:700"><tpl> $langProductSell </tpl></a></div>-->
 <DIV id="PutMerchandise-2t"><img src="<tpl> $template_dir </tpl>/member/images/buzhou-2.jpg" /></DIV>

<tpl> if $product_array.p_id != "" </tpl> <tpl> assign var='action' value='update' </tpl> <tpl> else </tpl> <tpl> assign var='action' value='save' </tpl> <tpl> /if </tpl>
<form action="own_product.php?action=<tpl> $action </tpl>" method="post" enctype="multipart/form-data" id="ownaddproduct" name="ownaddproduct">
	<input type="hidden" name="slPCId" id="slPCId" value="<tpl> $slPCId </tpl>" />
	<input type="hidden" name="slPCId_save" id="slPCId_save" value="<tpl> $slPCId </tpl>" />
	<input type="hidden" name="txtPid" id="txtPid" value="<tpl> $product_array.p_code </tpl>"/>
	<input type="hidden" name="txtPcode" id="txtPcode" value="<tpl> $product_array.p_code </tpl>"/>
	<input type="hidden" name="txtPstarttime" id="txtPstarttime" value="<tpl> $product_array.p_start_time </tpl>"/>
	<input type="hidden" name="txtPendtime" id="txtPendtime" value="<tpl> $product_array.p_end_time </tpl>"/>
	<input type="hidden" name="txtPstate" id="txtPstate" value="<tpl> $product_array.p_state </tpl>"/>
	<input type="hidden" name="txtViewnum" id="txtViewnum" value="<tpl> $product_array.p_view_num </tpl>"/>
	<input type="hidden" name="select_all" id="select_all" value="<tpl> $select_all </tpl>"/>
	<input type="hidden" name="pic_num" id="pic_num" value="<tpl> $pic_num|default:'0' </tpl>"/>
	<div id="ProductInfo_tidy" class="regist_left"><span><tpl> $langProductInfo </tpl></span></div>
	<table class="table_style" id="ProductInfo">
		<tr><!-- 拍卖，一口价，团购 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langSelltype </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<div id="div_radioSelltype0" <tpl> if $cansellType==2 </tpl>style="display:none;"<tpl> /if </tpl>><input type="radio" id="radioSelltype0"  name="radioSelltype" value="0"  onclick="changeAuctionType('0');"<tpl> if $selltype==0 </tpl> checked="checked" <tpl> /if </tpl> /><label for="radioSelltype0"><tpl> $langProductAAuction </tpl></label></div>
				<div id="div_radioSelltype1" <tpl> if $cansellType==2 </tpl>style="display:none;"<tpl> /if </tpl>><input type="radio" id="radioSelltype1"  name="radioSelltype" value="1"  onclick="changeAuctionType('1');"<tpl> if $selltype==1 </tpl> checked="checked" <tpl> /if </tpl> /><label for="radioSelltype1"><tpl> $langProductPrice </tpl></label></div>
				<div id="div_radioSelltype2" <tpl> if $cansellType==2 </tpl>style="display:none;"<tpl> /if </tpl>><input type="radio" id="radioSelltype2"  name="radioSelltype" value="2" onclick="changeAuctionType('2');"<tpl> if $selltype==2 </tpl> checked="checked" <tpl> /if </tpl> /><label for="radioSelltype2"><tpl> $langPcamel </tpl></label></div>
				<div id="div_radioSelltype3" <tpl> if $cansellType==1 </tpl>style="display:none;"<tpl> /if </tpl>><input type="radio" id="radioSelltype3"  name="radioSelltype" value="3" onclick="changeAuctionType('3');"<tpl> if $selltype==3 </tpl> checked="checked" <tpl> /if </tpl> /><label for="radioSelltype3"><tpl> $langPexhibit </tpl></label></div>
			</td>
		</tr>
		<tr><!-- 商品类别 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductCate </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<tpl> if $product_array.p_code eq '' </tpl>
					<lable><tpl> $cate_name </tpl></lable>
					<input type="button"  name="event_submit_do_re_select_category" value="<tpl> $langbtnCateEdit </tpl>" onclick="location.href='own_product.php?action=sell'" />
				<tpl> else </tpl>
					<div id="pc_id_originality" style="display:''"><tpl> $cate_name </tpl>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" id="edit_button" value="<tpl> $langCedit </tpl>" onclick="editstate()"/></div>
					<div id="pc_id_edit" style="display:none">
						<select name="pc_c1" id="pc_c1" onchange="ajax_get_attribute(this.value);">
						<option value=""></option>
							<tpl> foreach item = parent from = $ProductCateArray </tpl>
								<option value="<tpl>$parent.id</tpl>||<tpl>$parent[5]</tpl>" ><tpl>$parent.name</tpl></option>
							<tpl> /foreach </tpl>     
						</select>
						<select name="pc_c2" id="pc_c2" onchange="ajax_get_attribute(this.value);">
						</select>
						<select name="pc_c3" id="pc_c3" onchange="ajax_get_attribute(this.value);">
						</select>
						<select name="pc_c4" id="pc_c4" onchange="ajax_get_attribute(this.value);">
						</select>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" id="cancel_edit_button" value="<tpl> $langCCanceledit </tpl>" onclick="canceledit()"/>
					</div>
				<tpl> /if </tpl>
			</td>
		</tr>
		<tr><!-- 全新 二手 闲置 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductAType </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<input type="radio" name="radioType" id="radioType1" value="0" <tpl> if $product_array.p_type == 0 </tpl> checked="checked"<tpl> /if </tpl> /><label for="radioType1"><tpl> $langProductTypeNew </tpl></label>
				<input type="radio" name="radioType" id="radioType2" value="1" <tpl> if $product_array.p_type == 1 </tpl> checked="checked"<tpl> /if </tpl> /><label for="radioType2"><tpl> $langProductTypeSec </tpl></label>
				<input type="radio" value="2" name="radioType" id="radioType3" <tpl> if $product_array.p_type == 2 </tpl> checked="checked"<tpl> /if </tpl> /><label for="radioType3"><tpl> $langProductTypePlace </tpl></label>
			</td>
		</tr>
		<tpl> if $shop_product_cate_array </tpl><!-- 店铺商品分类 -->
		<tr>
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langPShopClassSelect </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<select name="txtPclassid" id="txtPclassid">
					<option value="0"><tpl> $langPPleaseSelect </tpl></option>			
					<tpl> section name=loop loop=$shop_product_cate_array </tpl>
						<option value="<tpl> $shop_product_cate_array[loop].class_id </tpl>" <tpl> if $product_array.p_class_id eq $shop_product_cate_array[loop].class_id </tpl> selected <tpl> /if </tpl> ><tpl> $shop_product_cate_array[loop].class_name </tpl></option>
						<tpl> foreach from=$shop_product_cate_array[loop].child item=one </tpl>
							<option value="<tpl> $one.class_id </tpl>" <tpl> if $product_array.p_class_id eq $one.class_id </tpl> selected <tpl> /if </tpl> >&nbsp;&nbsp;<tpl> $one.class_name </tpl></option>
						<tpl> /foreach </tpl>
					<tpl> /section </tpl>
				</select>
			</td>
		</tr>   
		<tpl> /if </tpl>
		<tr id="attribute_baby"><!-- 商品属性 -->
		<tpl> if $have_attribute == 1 </tpl>
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductAttribute </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<tpl> foreach from=$product_attribute item=one </tpl>
					<tpl> $one.a_name </tpl>: 
					<tpl> if $one.a_type == 0 </tpl>
						<select name="attribute_content[]">
							<option value=""></option>
							<tpl> foreach from=$one.content item=two </tpl>
								<option value="<tpl> $two.ac_id </tpl>|<tpl> $two.a_id </tpl>" <tpl> if $two.ischecked eq 1 </tpl>selected="selected"<tpl> /if </tpl>><tpl> $two.ac_content </tpl></option>
						<tpl> /foreach </tpl>
						</select>
					<tpl> /if </tpl>
					<tpl> if $one.a_type == 1 </tpl>
						<tpl> foreach from=$one.content item=two </tpl>
							<input name="attribute_content[]" type="checkbox" value="<tpl> $two.ac_id </tpl>|<tpl> $two.a_id </tpl>" <tpl> if $two.ischecked eq 1 </tpl>selected="selected"<tpl> /if </tpl> ><tpl> $two.ac_content </tpl> 
						<tpl> /foreach </tpl>
					<tpl> /if </tpl>
					<br />
				<tpl> /foreach </tpl>
			</td>
		<tpl> /if </tpl>
		</tr>
		<tpl> if $brand_list[0].pb_id neq '' </tpl>
		<tr><!-- 品牌 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langPBrand </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<input type="hidden" name="brand_id" id="brand_id" value="<tpl> $product_array.p_brand_id </tpl>"/>
				<select id="brand_c1" class="searchformselect" name="brand_c1" style="width: 120px">
					<option valus="" selected></option>
					<tpl> foreach item = parent from = $brand_list </tpl>
						<option <tpl> if $sel_brand[0].pb_id eq $parent.pb_id </tpl>selected="selected"<tpl> /if  </tpl> value="<tpl>$parent.pb_id</tpl>||<tpl>$parent.is_parent</tpl>"><tpl> $parent.pb_name </tpl></option>
					<tpl> /foreach </tpl>
				</select>
				<select class="searchformselect" id="brand_c2" style="width: 120px" name="brand_c2">
					<option valus="<tpl> $sel_brand[1].pb_id </tpl>" selected><tpl> $sel_brand[1].pb_name </tpl></option>
				</select>
				<select class="searchformselect" id="brand_c3" style="width: 120px" name="brand_c3">
					<option valus="<tpl> $sel_brand[2].pb_id </tpl>" selected><tpl> $sel_brand[2].pb_name </tpl></option>
				</select>
			</td>
		</tr>
		<tpl> /if </tpl>
		<tr><!-- 商品名称 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductName </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<input id="txtPname" name="txtPname"  maxLength=30 size=40 value="<tpl> $product_array.p_name </tpl>" />
				<label style="display:none" for="txtPname" class="wrong" metaDone="true" generated="true"><tpl> $alertPname </tpl></label>       
			</td>
		</tr>
		<tr><!-- 图片上传 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langUploadPic </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<tpl> section name=loop loop=$pic_array </tpl>
					<li style="float:left; padding-right:10px; padding-top:5px;"><img src=<tpl> $site_url </tpl>/<tpl> $pic_array[loop].small_pic </tpl> /><br /><a href='javascript:;' onclick=ajaxFileDel("<tpl> $pic_array[loop].small_pic </tpl>",this);><tpl> $langbtnProductDel </tpl></a></li>
				<tpl> /section </tpl>
				<li style="float:left; clear:both; width:100%;"><a class="bg-tj" href="javascript:;" onclick="pic_add_tr();"><img src="<tpl> $template_dir </tpl>/member/images/tj-1.jpg" /></a></li>

				<div id="div_pic_upload"></div>
				<div class="tishi-y">
				<tpl> $langProductPicSize </tpl>
				</div>
				<div style=" clear:both; width:100%; font-size:0px; height:5px;"></div>
			</td>
		</tr>
		<script>
			var num=0;
			function pic_add_tr(){
				//如果图片数量超过3 则返回信息，不允许添加
				if($("#pic_num").val() > 2){
					alert("<tpl> $langPPicNumOne </tpl>3<tpl> $langPPicNumTwo </tpl>");
					return false;
				}
				$('#div_pic_upload').append('<input type=\'file\' name=\'txtPpic_'+num+'\' /><br />');
				num++;
				//图片数量+1
				$("#pic_num").val(parseInt($("#pic_num").val())+1);
			}
		</script>
		<tr><!-- 商品内容 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductInfo </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<tpl>php</tpl>
					include("../classes/resource/fckeditor/fckeditor.php") ;
					$oFCKeditor = new FCKeditor('txtPinfo') ;
					$oFCKeditor->BasePath	= '../classes/resource/fckeditor/' ;
					$oFCKeditor->ToolbarSet = 'Simple';
					$oFCKeditor->Width	= 485 ;
					$oFCKeditor->Height	= 330 ;
					$oFCKeditor->Value		= $this->_tpl_vars['product_array']['p_intro'] ;
					$oFCKeditor->Create() ;
				<tpl>/php</tpl>	
			</td>
		</tr>
		<tr ><!-- 库存数量 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductStorage </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<input maxLength="6" class="in-juli" size="5" name="txtPstorage" id="txtPstorage" value="<tpl> $product_array.p_storage|default:1 </tpl>" /><tpl> $langProductAPiece </tpl>
				<label style="display:block;" metaDone="true" generated="true" for="txtPstorage"></label>
			</td>
		</tr>
		<!--<tpl> if $config_predeposit eq '1' </tpl>
		<tr > 预存款选项
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langPPredeposit </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<input type="checkbox" name="pay_predeposit" id="pay_predeposit" <tpl> if $product_array.p_predeposit_state eq '0' </tpl>checked="checked"<tpl> /if </tpl> value="0" /><tpl> $langPPredeposit </tpl>
			</td>
		</tr>
		<tpl> /if </tpl> -->
		<tr id="tr_payment"><!-- 支付方式 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductPayment </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
			<tpl> foreach from=$payment_array item=one key=key  </tpl>
				<input onclick="if(this.checked == true){select_cur('<tpl> $one.currency_line </tpl>');}else{select_no_cur('<tpl> $one.currency_line </tpl>','<tpl> $key </tpl>');}" type="checkbox" <tpl> if $one.check eq '1' </tpl>checked="checked"<tpl> /if </tpl> value="<tpl> $key </tpl>" name="txtPayment[<tpl> $key </tpl>]" id="txtPayment_<tpl> $key </tpl>" /><label for="txtPayment_<tpl> $key </tpl>"><tpl> $one.name </tpl></label>
				<input type="hidden" name="payment_cur_<tpl> $key </tpl>" id="payment_cur_<tpl> $key </tpl>" value="<tpl> $one.currency_line </tpl>" /><!-- 该支付方式支持的货币种类 -->
			<tpl> /foreach </tpl>		
			</td>
		</tr>
		<tr id="tr_payment_description"> <!-- 支付方式说明 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"></th>
			<th width="80%" height="30" align="left" bgcolor="#F3F3F3"  style=" font-weight:100; border:1px solid #E4E4E4; padding:5px">
				<tpl> $langPPaymentDescription </tpl>		
				<tpl> section name=loop loop=$payment_description </tpl>
					<tpl> $payment_description[loop].name </tpl>;
				<tpl> /section </tpl>	
			</th>
		</tr>
		<tr id="tr_product_currency" ><!-- 货币选择 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductCurrency </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<tpl> foreach from=$exchange_array item=one key=key  </tpl>
					<input type="hidden" name="exchange_rate_<tpl> $one.exchange_name </tpl>" id="exchange_rate_<tpl> $one.exchange_name </tpl>" value="<tpl> $one.exchange_rate </tpl>" /><!-- 汇率 -->
					<div id="div_cur_<tpl> $one.exchange_name </tpl>" style=" float:left;display:<tpl> $one.display </tpl>">
					<input type="checkbox" <tpl> foreach item=two from=$product_currency </tpl>	<tpl> if $two eq $one.exchange_name </tpl>checked="checked"<tpl> /if </tpl>	<tpl> /foreach </tpl> name="currency[<tpl> $one.exchange_name </tpl>]" id="currency_<tpl> $one.exchange_name </tpl>" value="<tpl> $one.exchange_name </tpl>" /><label for="currency_<tpl> $one.exchange_name </tpl>"><tpl> $one.exchange_remark </tpl>(<tpl> $one.exchange_name </tpl>)</label>&nbsp;&nbsp;&nbsp;
					<div id="price_rate_<tpl> $one.exchange_name </tpl>">
						<tpl> if $product_array.p_price neq '' </tpl>
							<tpl> if $product_array.p_price/$one.exchange_rate*100|string_format:"%.2f" < 0.01 </tpl>
								0.01
							<tpl> else </tpl>
								<tpl> $product_array.p_price/$one.exchange_rate*100|string_format:"%.2f" </tpl>
							<tpl> /if </tpl>
						<tpl> /if </tpl>
					</div>
					</div>
				<tpl> /foreach </tpl>
			</td>
		</tr>
		<tr id="tr_product_currency_description" ><!-- 货币说明 -->
			<th width="20%" height="30" bgcolor="#FCFCFC"></th>
			<th width="80%" height="30" align="left" bgcolor="#F3F3F3" style=" font-weight:100; border:1px solid #E4E4E4; padding:5px">
				<tpl> $langPCurrencyDescription </tpl>
				<tpl> section name=loop loop=$exchange_array </tpl>
					<tpl> $exchange_array[loop].exchange_name </tpl>;
				<tpl> /section </tpl>		
			</th>
		</tr>
	</table>
	<script>
	//选中支付方式的时候，显示对应的货币种类
	function select_cur(str){
		if(str.indexOf('|') >= 0){
			line = str.split('|');
			for(i=0;i<line.length;i++){
				$("#div_cur_"+line[i]).css("display",'');
			}
		}else{
			$("#div_cur_"+str).css("display",'');
		}
	}
	//取消支付方式的时候，隐藏对应的货币种类
	function select_no_cur(str,payment_name){
		//取该支付方式支持的货币种类str
		cur_array = str.split('|');
		for(i=0;i<cur_array.length;i++){
			//取其他支付方式，判断是否有该种货币的信息，并且判断是否勾选，如果没有勾选，则隐藏并且取消够先该货币种类
			cur_sign = false;
			$('#ownaddproduct input[@type=hidden]').each(function(){//每种支付方式对应的货币字符
				//判断其他的支付方式是否也存在该货币种类
				if('payment_cur_'+payment_name != this.name && this.name.indexOf('payment_cur_') >= 0){
					other_cur_array = this.value.split('|');
					payment_pro_name = this.name.replace('payment_cur_','txtPayment_');
					for(j=0;j<other_cur_array.length;j++){
						if(cur_array[i] == other_cur_array[j] && $('#'+payment_pro_name).attr('checked') == true){
							//存在
							cur_sign = true;
						}
					}
					payment_pro_name = '';
				}
			})
		
			//说明其他支付方式没有该货币种类，则可以隐藏并且取消该货币的层和复选
			if(cur_sign == false){
				$("#div_cur_"+cur_array[i]).css("display",'none');
				$("#currency_"+cur_array[i]).attr("checked",false);
			}
		}
	}
	//计算 单价和各货币种类换算的值
	function price_to_exchange(price){
		if(price == ''){
			price = 0;
		}else{
			price = price*1;
		}
		//取货币种类的汇率
		$('#ownaddproduct input[@type=hidden]').each(function(){
			if(this.name.indexOf('exchange_rate_') >= 0){
				var line = this.name.split('exchange_rate_');
				//alert(line[line.length-1]);
				//在换算区域赋值 parseFloat()
				value = $("#exchange_rate_"+line[line.length-1]).val();
				one = accDiv(price,value);
				if(Math.round(one*10000)/100 < 0.01){
					$("#price_rate_"+line[line.length-1]).html(0.01);//Math.round(one*100)/100
				}else{
					$("#price_rate_"+line[line.length-1]).html(Math.round(one*10000)/100);
				}
			}
		});
	}
	function accDiv(arg1,arg2){
		var t1=0,t2=0,r1,r2;
		try{t1=arg1.toString().split(".")[1].length}catch(e){}
		try{t2=arg2.toString().split(".")[1].length}catch(e){}
		with(Math){
			r1=Number(arg1.toString().replace(".",""));
			r2=Number(arg2.toString().replace(".",""));
			return (r1/r2)*pow(10,t2-t1);
		}
	} 
	</script>
	
    <div class="regist_left" id="TradeCondition_tidy"><span><tpl> $langTradeCondition </tpl></span></div>
    <table class="table_style" id="TradeCondition">
		<tr id="auctionOption1">
			<th></th>
			<td></td>
		</tr>
		<tr id="auctionOption2"><!-- 起拍价 -->
			<th width="20%" height="66" align="right" bgcolor="#FCFCFC" class="fontSize14"><strong><tpl> $langProductABeginPrice </tpl></strong></th>
			<td width="80%" height="66" align="left" bgcolor="#F3F3F3" class="fontSize14"> 
				<div style="float:left;width:700px;  display:block">
					<input maxLength="8" size="10" id="minimumBid" class="input_saleproduct" name="minimumBid" value="<tpl> $product_array.p_price </tpl>" onkeyup="price_to_exchange(this.value);" /> <br />
				</div>
				<div style="float:left;width:700px; height:25px; display:block">
					<label style="display:block;" metaDone="true" generated="true" for="minimumBid"> </label>
					<tpl> $langProductABeginPriceIsLowPrice </tpl>  
					<div id="catePriceLimita"></div>
				</div>      
			</td>
		</tr>
		<tr id="auctionOption4"><!-- 加价幅度 -->
			<th width="20%" height="50" align="right" bgcolor="#FCFCFC" class="fontSize14"><strong><tpl> $langProductAPriceAddScope </tpl></strong></th>
			<td width="80%" height="50" align="left" bgcolor="#F3F3F3" class="fontSize14">
				<input type="radio" checked="checked" name="system_step" value="1" id="inc1" onclick="document.getElementById('price_step').readOnly=true;document.getElementById('price_step').className='disabled';document.getElementById('price_step').value=0;" />
				<label for="inc1"><tpl> $langProductASystemAuto </tpl></label>
				<br />
				<input type="radio"  name="system_step" value="0" id="inc2" onclick="document.getElementById('price_step').readOnly=false;document.getElementById('price_step').className=''" />
				<label for="inc2"><tpl> $langProductAUserDefined </tpl></label>
				<input maxLength=8 size=10 name="price_step" value="0.0" id="price_step" class="input_saleproduct">
				<label style="display:block;" metaDone="true" generated="true" for="price_step"></label>
				<span class="posttip"><tpl> $langProductACommendYouSelect </tpl><tpl> $langProductASystemAutoAddPrice </tpl></span>
				<script type="text/javascript">
					if (document.getElementById('inc1').checked) {
						document.getElementById('price_step').readOnley=true;
						document.getElementById('price_step').className='disabled';
						document.getElementById('price_step').value = 0;
					}
				</script>		
			</td>
		</tr>
		<tr id="fixpriceOption2"><!-- 一口价 -->
			<th width="20%" height="60" align="right" bgcolor="#FCFCFC"> <strong><tpl> $langProductPrice </tpl></strong> </th>
			<td width="80%" align="left" bgcolor="#F3F3F3">
				<div style="float:left;  margin-bottom:5px;width:700px; display:block">
					<input type="text" id="txtPprice" class="input_saleproduct" maxLength="8" size="10" name="txtPprice" value="<tpl> $product_array.p_price </tpl>" onkeyup="price_to_exchange(this.value);" />       
					<label style="display:none;"  metaDone="true" generated="true" for="txtPprice"></label>
				</div>
				<div style="float:left;width:700px; display:block">
					<label  for='txtPprice' style="display:block"><tpl> $langProductAFastnessPrice </tpl></label>
					<div id="catePriceLimit1"></div>
				</div>		
			</td>
		</tr>
		<tr id="camelOption2"><!-- 团购价 -->
			<th width="20%" height="50" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductAGroupPrice </tpl></strong></th>
			<td width="80%" align="left" bgcolor="#F3F3F3">		
				<div style="float:left;width:700px;  display:block">
					<input type="text" id="txtGroupprice" maxLength="8" size="10" name="txtGroupprice" class="input_saleproduct" value="<tpl> $product_array.p_group_price </tpl>" />
					<label style="display:block;"metaDone="true" generated="true" for="txtGroupprice"></label>
				</div>
			<div style="float:left;width:700px; display:block">
				<span style="font-size:12px"><tpl> $langProductABuyNumlowNum </tpl> </span>
			</div>
			</td>
		</tr>
		<tr id="camelOption5"><!-- 团购原价 -->
			<th width="20%" height="50" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductAddOldPrice </tpl></strong></th>
			<td width="80%" align="left" bgcolor="#F3F3F3">		
				<div style="float:left;width:700px; display:block">
					<input type="text" id="txtPoldprice" class="input_saleproduct" maxLength="8" size="10" name="txtPoldprice" value="<tpl> $product_array.p_price </tpl>" />
					<label style="display:block;" metaDone="true" generated="true" for="txtPoldprice"></label>
				</div>
				<div style="float:left;width:700px; display:block">
					<span style="font-size:12px"><tpl> $langProductAOldPriceGroup </tpl></span>
				</div> 
			</td>
		</tr>
		<tr id="camelOption4"><!-- 团购最小团购数量 -->
			<th width="20%" height="50" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductAGroupMinCount </tpl></strong></th>
			<td width="80%" align="left" bgcolor="#F3F3F3">		
				<div style="float:left;width:700px; display:block">
					<input type="text" id="txtGroupmincount" maxLength="8" class="input_saleproduct" size="10" name="txtGroupmincount" value="<tpl> $product_array.p_group_mincount|default:5 </tpl>" /><tpl> $langProductAPiece </tpl> 
					<label style="display:block;"  metaDone="true" generated="true" for="txtGroupmincount"></label>
				</div>
				<div style="float:left;width:700px; display:block">   
					<span><tpl> $langProductA5To100BabyNum </tpl></span> 
					<span style="font-size:12px"><tpl> $langProductABuyNumGroupMixNum </tpl></span>
				</div>
			</td>
		</tr>
		<tr id="tr_area"><!-- 地区 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductArea </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<input type="hidden" name="area_id" id="area_id" value="<tpl> $product_array.p_area_id </tpl>"/>
				<select id="area_c1" class="searchformselect" name="area_c1" style="width: 120px">
					<option valus="" selected></option>
					<tpl> foreach item = parent from = $area_array </tpl>
						<option <tpl> if $sel_area[0].area_id eq $parent.area_id </tpl>selected="selected"<tpl> /if  </tpl> value="<tpl>$parent.area_id</tpl>||<tpl>$parent.is_parent</tpl>"><tpl> $parent.area_name </tpl></option>
					<tpl> /foreach </tpl>
				</select>
				<select class="searchformselect" id="area_c2" style="width: 120px" name="area_c2">
					<option valus="<tpl> $sel_area[1].area_id </tpl>" selected><tpl> $sel_area[1].area_name </tpl></option>
				</select>
				<select class="searchformselect" id="area_c3" style="width: 120px" name="area_c3">
					<option valus="<tpl> $sel_area[2].area_id </tpl>" selected><tpl> $sel_area[2].area_name </tpl></option>
				</select>
				<select class="searchformselect" id="area_c4" style="width: 120px" name="area_c4">
					<option valus="<tpl> $sel_area[3].area_id </tpl>" selected><tpl> $sel_area[3].area_name </tpl></option>
				</select>
			</td>
		</tr>
		<tr id="tr_transfee"><!-- 运费 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langTranFee </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
			<ul>
				<li>
					<input name="radioTransfee" type="radio" id="whopsSeller" onclick="$('#ApplyPostage').css('display','none')" value="0" <tpl> if $product_array.p_transfee_charge eq '0' || $product_array.p_transfee_charge eq '' </tpl> checked="checked" <tpl> /if </tpl>  />
					<label for="whopsSeller"><tpl> $langSelaTranFee </tpl></label>
				</li>
				<li>
					<input name="radioTransfee" type="radio" id="whopsBuyer" onclick="$('#ApplyPostage').css('display','block')"  value="1" <tpl> if $product_array.p_transfee_charge eq '1' </tpl> checked="checked" <tpl> /if </tpl> />
					<label for="whop</ul>sBuyer"><tpl> $langProductAListBear </tpl></label>
				</li>
				<ul>
					<li id="ApplyPostage" <tpl> if $product_array.p_transfee_charge eq '0' || $product_array.p_transfee_charge eq '' </tpl> style="display:none" <tpl> /if </tpl>>
					<label for="isApplyPostage_false"><tpl> $langPCommonlyPost </tpl>:</label>
					<input maxLength="8" size="8" id="pyTF" name="pyTF" value="<tpl> $product_array.p_tf_py|default:0.0 </tpl>" />
					<tpl> $langCYuan </tpl> <tpl> $langPCelerityPost </tpl>:
					<input maxLength="8" size="8" id="kdTF" name="kdTF" value="<tpl> $product_array.p_tf_kd|default:0.0 </tpl>" />
					<tpl> $langCYuan </tpl> EMS:
					<input maxLength="8" size="8" id="emsTF" name="emsTF" value="<tpl> $product_array.p_tf_ems|default:0.0 </tpl>" />
					<tpl> $langCYuan </tpl> 
					<label style="display:block;" metaDone="true" generated="true" for="pyTF"></label>
					<label style="display:block;" metaDone="true" generated="true" for="kdTF"></label>
					<label style="display:block;" metaDone="true" generated="true" for="emsTF"></label>
					</li>
				</ul>
			</ul>
			<label class="fontsize12"  style="display:block">      
				<div id="whenNotAuction"> <tpl> $langProductATranFeeKilter </tpl> </div>
				<div id="whenAuction" style="display:none;"> <span class="posttip"><tpl> $langProductASaleBabyIssue </tpl></span></div>
			</label>
			</td>
		</tr>
		<tr><!-- 发票 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductAInvoices </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<input type=radio  value="0" name="radioInvoices" id="radioInvoices" <tpl> if $product_array.p_have_invoices eq 0 </tpl>checked<tpl> /if </tpl> /><label for="radioInvoices"><tpl> $langCNot </tpl></label>
				<input type=radio  value="1" name="radioInvoices" id="radioInvoices2" <tpl> if $product_array.p_have_invoices eq 1 </tpl>checked<tpl> /if </tpl> /><label for="radioInvoices2"><tpl> $langCHave </tpl></label>
			</td>
		</tr>
		<tr><!-- 保修 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langWarranty </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<input type="radio" value="0" name="radioWarranty" id="warrantyN" <tpl> if $product_array.p_have_warranty eq 0 </tpl>checked<tpl> /if </tpl> /><label for="warrantyN"><tpl> $langCNot </tpl></label>
				<input type="radio"  value="1" name="radioWarranty" id="warrantyY" <tpl> if $product_array.p_have_warranty eq 1 </tpl>checked<tpl> /if </tpl> /><label for="warrantyY"><tpl> $langCHave </tpl></label>
			</td>
		</tr>
		<tr><!-- 消费者保障 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langPattestation </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<label for="txtPgenuine"><input type="checkbox" name="txtPgenuine" id="txtPgenuine" value="1" <tpl> if $product_array.p_genuine eq '1' </tpl> checked <tpl> /if </tpl> /><img src="<tpl> $template_dir </tpl>/images/pic_zp.gif" align="absmiddle" alt="<tpl> $langPgenuine </tpl>" /><tpl> $langPgenuine </tpl></label>
				<label for="txtP7day"><input type="checkbox" name="txtP7day" id="txtP7day" value="1" <tpl> if $product_array.p_7day_return eq '1' </tpl> checked <tpl> /if </tpl> /><img src="<tpl> $template_dir </tpl>/images/pic_7day.gif" align="absmiddle" alt="<tpl> $langP7dayreturn </tpl>" /><tpl> $langP7dayreturn </tpl></label>
			</td>
		</tr>     
	</table>
    <div class="regist_left" id="OtherInfo_tidy"><span><tpl> $langProductAOtherInfo </tpl></span> </div>
	<table class="table_style" id="OtherInfo">
		<tr><!-- 有效期 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langValidDays </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<label class="fontsize12"  style="display:block">
					<input type="text" class="in-juli" name="slValiddays" id="slValiddays" maxLength="3" size="8" value="<tpl> $product_array.p_valid_days|default:'7' </tpl>" /><tpl> $langProductADay </tpl> <span class="posttip" id="durainfo"><tpl> $langProductABabyInfoIssueTime </tpl> </span>
				</label> 
			</td>
		</tr>
		<tr><!-- 开始时间 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langStartTime </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<input id="aaa" type="hidden" name="_fma.publi._0.s" value="<tpl> $default_time </tpl>" />
				<input type="radio" name="_now" value="0" id="_now0"  onclick="setTimeEnableAndInStock(false, false)"/>
				<label for="_now0"><tpl> $langProductAOnce </tpl></label>
				<br/>
				<input type="radio" name="_now" value="1" id="_now1"  onclick="setTimeEnableAndInStock(true, false)"/>
				<label for="now1"><tpl> $langProductAEnactment </tpl></label>
				<select name="_date" onchange="changeDate()">
				<option>2007<tpl> $langProductAYear </tpl></option>
				</select>
				<select name="_hour" onchange="changeHour()">
				</select>
				<tpl> $langProductAHour </tpl>
				<select name="_minute" onchange="setMinute()">
				</select>
				<tpl> $langProductAMinute </tpl> <span class="posttip"><tpl> $langProductAEnactmentBabySaleTime </tpl></span> <br/>
				<input type="hidden" name="_fma.publi._0.ap" value="0"/><!-- 放入仓库为-2，其他为0 -->
				<input type="radio" name="_now" value="2" id="inStock"  onclick="setTimeEnableAndInStock(false, true)"/>
				<label for="inStock"><tpl> $langProductAPutDepot </tpl></label></label>        
			</td>
		</tr>
		<tr id="republish"><!-- 自动重发 -->
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong>
			<tpl> $langProductAAutoPublish </tpl>
			</strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<input type="checkbox" value="1" name="chxAutopublish" id="chxAutopublish" <tpl> if $product_array.p_auto_publish == "1" </tpl>checked<tpl> /if </tpl> /><label for="chxAutopublish"><tpl> $langCYes </tpl></label>
				<label class="fontsize12" style="display:block"><tpl> $langProductASystemHelpYouAuto </tpl></label> 
			</td>
		</tr>
		<tr >
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langRecommended </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
				<input type="checkbox" value="1" name="chxRecommended" id="chxRecommended" <tpl> if $product_array.p_recommended == "1" </tpl>checked<tpl> /if </tpl> /><label for="chxRecommended"><tpl> $langCYes </tpl></label>
			</td>
		</tr>
		<tr >
			<th width="20%" height="30" align="right" bgcolor="#FCFCFC"><strong><tpl> $langProductARemark </tpl></strong></th>
			<td width="80%" height="30" align="left" bgcolor="#F3F3F3">
			<span class="fontSize14"><textarea style="height:70px" id="txtRemark" name="txtRemark" rows="10" cols="38"><tpl> $product_array.p_remark </tpl></textarea></span> 
			</td>
		</tr>
	</table>
	<div style="text-align:center; margin:20px">
	<!-- <input type="button" name="event_submit_do_preview" onclick="this.form.target='_blank';" value="  <tpl> $langbtnProductPreview </tpl>  " /> -->
		<input type="submit" class="bg_input" value="　<tpl> $langCsubmit </tpl>  " />
	</div>
</form>
</div>  
	<tpl> include file ='../footer.html' </tpl>
	<!-- 控制商品发布时间 -->
	<tpl>include file ='../javascript/changedate.html'</tpl>
	<!-- 控制商品发布时间end -->
</div>
</body>
</html>
<script language="javascript">
function changeAuctionType(type){
	//商品展览
	if(type == '3') {
		exhibit();
	
	//拍卖
	} else if(type == '0') {
		document.getElementById('whopsSeller').checked = 'checked';
		document.getElementById('whopsBuyer').disabled = true;
		$('#ApplyPostage').css('display','none');
		document.getElementById('whenAuction').style.display = '';
		document.getElementById('whenNotAuction').style.display = 'none';
		auction();
		
	}else{
		if (type == '1'){
			fixprice();
		}else{
			camel();
		}
		document.getElementById('whopsBuyer').disabled = false;
		document.getElementById('whenAuction').style.display = 'none';
		document.getElementById('whenNotAuction').style.display = '';
		$('#tr_product_currency').css('display','');
	}
}
//商品展览
function exhibit() {
	fixprice();
	//支付方式
	document.getElementById('tr_payment').style.display = 'none';
	//支付方式说明
	document.getElementById('tr_payment_description').style.display = 'none';
	//货币选择
	document.getElementById('tr_product_currency').style.display = 'none';
	//货币选择说明
	document.getElementById('tr_product_currency_description').style.display = 'none';
	//一口价
	document.getElementById('fixpriceOption2').style.display = 'none';
	//地区
	document.getElementById('tr_area').style.display = 'none';
	//运费
	document.getElementById('tr_transfee').style.display = 'none';
}
//非商品展览
function unExhibit() {
	//支付方式
	document.getElementById('tr_payment').style.display = '';
	//支付方式说明
	document.getElementById('tr_payment_description').style.display = '';
	//货币选择
	document.getElementById('tr_product_currency').style.display = '';
	//货币选择说明
	document.getElementById('tr_product_currency_description').style.display = '';
	//地区
	document.getElementById('tr_area').style.display = '';
	//运费
	document.getElementById('tr_transfee').style.display = '';
}
//一口价
function fixprice() {
	unExhibit();
	document.getElementById('auctionOption2').style.display = 'none';
	document.getElementById('auctionOption4').style.display = 'none';
	document.getElementById('camelOption2').style.display = 'none';
	document.getElementById('camelOption4').style.display = 'none';
	document.getElementById('camelOption5').style.display = 'none';
	document.getElementById('fixpriceOption2').style.display = '';
	document.getElementById('txtPoldprice').value = document.getElementById('txtPprice').value;
	document.getElementById('republish').style.display = '';//重发
}
//拍卖
function auction() {
	unExhibit();
	document.getElementById('auctionOption2').style.display = '';
	document.getElementById('auctionOption4').style.display = '';
	document.getElementById('camelOption2').style.display = 'none';
	document.getElementById('camelOption4').style.display = 'none';
	document.getElementById('camelOption5').style.display = 'none';
	document.getElementById('fixpriceOption2').style.display = 'none';
	document.getElementById('txtPoldprice').value = document.getElementById('txtPprice').value;
	document.getElementById('republish').style.display = '';//重发
}
//团购
function camel() {
	unExhibit();
	document.getElementById('auctionOption2').style.display = 'none';
	document.getElementById('auctionOption4').style.display = 'none';
	document.getElementById('fixpriceOption2').style.display = 'none';
	document.getElementById('camelOption2').style.display = '';
	document.getElementById('camelOption4').style.display = '';
	document.getElementById('camelOption5').style.display = '';
	document.getElementById('republish').style.display = 'none';//重发
}

function editstate(){
	document.getElementById('pc_id_originality').style.display = 'none';
	document.getElementById('pc_id_edit').style.display = '';
}
function canceledit(){
	document.getElementById('pc_id_originality').style.display = '';
	document.getElementById('pc_id_edit').style.display = 'none';
	slPCId = document.getElementById('slPCId_save').value;
	document.getElementById('slPCId').value = slPCId;
}

//获得开始时间radio的默认值
var state = <tpl> $checked_state </tpl>+'';

switch(state){
	case '1':
		document.getElementById('_now0').checked = true;
		setTimeEnableAndInStock(false, false);
		break;
	case '2':
		document.getElementById('_now1').checked = true;
		setTimeEnableAndInStock(true, false);
		
		break;
	case '3':
	 	document.getElementById('inStock').checked = true;
		setTimeEnableAndInStock(false, true);
		break;
}
</script>